package pub.developers.forum.api.service;

import pub.developers.forum.api.model.PageRequestModel;
import pub.developers.forum.api.model.PageResponseModel;
import pub.developers.forum.api.model.ResultModel;
import pub.developers.forum.api.request.comment.CommentCreateRequest;
import pub.developers.forum.api.response.comment.CommentPageResponse;

import java.util.List;


public interface CommentApiService {

    ResultModel create(CommentCreateRequest request) throws Exception;

    ResultModel<PageResponseModel<CommentPageResponse>> page(PageRequestModel<Long> pageRequest);

    ResultModel<List<CommentPageResponse>> beCommented();

    ResultModel<List<CommentPageResponse>> getListByPostId(Long postId);

    //给评论点赞
    ResultModel<Long> followCommentService(Long commentID);

    //给评论取消点赞
    ResultModel unfollowCommentService(Long commentID);

    //根据一级评论id 拿到二级评论
    ResultModel<PageResponseModel<CommentPageResponse>> allReplyService(PageRequestModel pageRequestModel);
}
